package com.gong.DesignPattern.OrderPattern;

import java.util.ArrayList;
import java.util.List;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/6/24 0024 10:29
 */
public class Broker {
    private List<Order> list = new ArrayList<>();

    public void takeTusk(Order order){
        list.add(order);
    }

    public void doWork(){
        for (Order order : list) {
            order.execute();
        }
    }
}
